package day0621;

import java.util.Arrays;

public class Test8 {
    public static void  shuffle(String[]  n){
        for(int i=0; i<n.length;i++){
            int num=(int)(Math.random()*3);// [0.0*3---3.0)
            //n[2]  n[num]
            String t=n[i];
            n[i]=n[num];
            n[num]=t;
        }
        System.out.println(Arrays.toString(n));
    }


    public static void main(String[] args) {
        String[]  n={"张3","李4","赵6"};
        shuffle(n);
    }

}
